/********************************************************************

humris game engine

********************************************************************/

#include "stdafx.h"
#include "partial/game_win/game.h"

using namespace std;


int main( int argc, char** argv ) {

	loadShapes();

	/* prepare the window */
	glutInit( &argc, argv );

	// window setup
	glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA );
	glutInitWindowSize ( WINDOW_WIDTH, WINDOW_HEIGHT );
	glutInitWindowPosition( 100, 100 );
	glutCreateWindow( "CS377s: Humris" );

	setupSound();
	setupNetwork();

	// Start the stupid background music
	backgroundSound(false);

	/* define popup menu */
	//glutCreateMenu( handleMenu );
	//glutAddMenuEntry("Quit", 10);
	//glutAttachMenu( GLUT_RIGHT_BUTTON );

	glutKeyboardFunc( handleKeyboard );
	glutSpecialFunc( handleSpecial );
	glutMouseFunc( handleMouse );

	glutReshapeFunc( reshapeWin );
	glutDisplayFunc( displayWin );

	/* begin animation */
	displayLoop( 0 );

	glutMainLoop();

	cleanupSound();
	cleanupNetwork();

	return 0;
}
